package com.gsk.europepharma.salesReport.struts.actions;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

public class RefreshUGP extends Action {

	public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
		
		HttpSession sessionObject = request.getSession();
		
		String source = request.getParameter("source");
		Integer CS_SRC = Integer.parseInt(source);
		
		boolean ugp = (CS_SRC == 1 || CS_SRC == 2 || CS_SRC == 3 || CS_SRC == 4 || CS_SRC == 5 || CS_SRC == 6);
		sessionObject.setAttribute("ugp", ugp);
	
		return null;
	}

}
